import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import i18n from './i18n'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import './style.css'

// 引入MockJS (仅在开发环境)
if (import.meta.env.DEV || import.meta.env.VITE_MOCK_ENABLED === 'true') {
  import('./mock/index.js').then(() => {
    console.log('MockJS 已启用，模拟数据服务已启动')
    console.log('开发环境配置:', {
      title: import.meta.env.VITE_APP_TITLE,
      apiBaseUrl: import.meta.env.VITE_API_BASE_URL,
      mockEnabled: import.meta.env.VITE_MOCK_ENABLED
    })
  })
}

// 创建Vue应用实例
const app = createApp(App)

// 使用插件
app.use(router)
app.use(store)
app.use(i18n)
app.use(Antd)

// 挂载应用
app.mount('#app') 